-- GENERATED SPELL FOR [Commander Stoutbeard] --


function spell0_26796(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(31403,pUnit)
pUnit:RegisterEvent('Sorts_26796', 658, 1)
end

function spell1_26796(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(60067,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26796', 2000, 1)
end

function spell2_26796(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26796', 6287, 1)
end

function spell3_26796(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_26796', 672, 1)
end

function spell4_26796(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_26796', 2000, 1)
end

function Sorts_26796(pUnit, Event)
local choix_sorts_26796 = math.random(0, 4)
if choix_sorts_26796 == 0 then
pUnit:RegisterEvent('spell0_26796', 1, 1)
end
if choix_sorts_26796 == 1 then
pUnit:RegisterEvent('spell1_26796', 1, 1)
end
if choix_sorts_26796 == 2 then
pUnit:RegisterEvent('spell2_26796', 1, 1)
end
if choix_sorts_26796 == 3 then
pUnit:RegisterEvent('spell3_26796', 1, 1)
end
if choix_sorts_26796 == 4 then
pUnit:RegisterEvent('spell4_26796', 1, 1)
end
end

function mob26796_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26796', math.random(1500, 3000), 1)
end

function mob26796_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26796_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26796_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26796, 1, 'mob26796_Action')
RegisterUnitEvent(26796, 2, 'mob26796_Leave')
RegisterUnitEvent(26796, 3, 'mob26796_Kill')
RegisterUnitEvent(26796, 4, 'mob26796_Die')
